package com.peas.platform.module.icims.expenditure.kpis.adapter.repository.po;

import java.util.*;
import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 调整单
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_expenditure_adjustment`")
public class ExpenditureAdjustmentPo extends BasePo {

    // 指标单表ID
    // （指标单表）外键
    @Comment(value = "指标单表ID")
    @NotNull(message = "指标单表ID不能为空")
    @TableField(value = "`expenditure_kpi_id`", jdbcType = JdbcType.BIGINT)
    private Long expenditureKpiId;

    // 填单人部门ID
    // （组织架构表）外键
    @Comment(value = "填单人部门ID")
    @TableField(value = "`submit_organization_id`", jdbcType = JdbcType.BIGINT)
    private Long submitOrganizationId;

    // 填单人用户ID
    // （用户表）外键
    @Comment(value = "填单人用户ID")
    @TableField(value = "`submit_user_id`", jdbcType = JdbcType.BIGINT)
    private Long submitUserId;

    // 调整单号
    // 自动生成
    @Comment(value = "调整单号")
    @Size(max = 100, message = "调整单号不能超过100个字符")
    @TableField(value = "`adjustment_code`", jdbcType = JdbcType.VARCHAR)
    private String adjustmentCode;

    // 调整日期
    @Comment(value = "调整日期")
    @TableField(value = "`adjustment_date`", jdbcType = JdbcType.TIMESTAMP)
    private Date adjustmentDate;

    // 调整前金额
    @Comment(value = "调整前金额")
    @TableField(value = "`before_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal beforeAmount;

    // 调整金额
    @Comment(value = "调整金额")
    @TableField(value = "`adjust_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal adjustAmount;

    // 调整后金额
    @Comment(value = "调整后金额")
    @TableField(value = "`after_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal afterAmount;

    // 调整比例
    @Comment(value = "调整比例")
    @TableField(value = "`adjust_rate`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal adjustRate;

    // 状态
    // 枚举取值:ExpenditureAdjustmentState
    @Comment(value = "状态")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
